export default {　　 //3d相关变量
    renderer: null,
    scene: null,
    camera: null,
    raycaster: null,
    mouse: null,

    //提示加载中
    loading: null,

    //画布
    width: 0,
    height: 0,

    //当前组件相关
    selectedMeshId: 0,
    selectedItem: null,
    mainImgMesh: null,
    transformType: "translate",
    currentTransformBar: null,

    //控制器
    transformControls: null,
    orbitControls: null,
    listeners: [],
    isReady: false,
    ready(callback) {
        if(this.isReady) {
            callback()
        }else {
            this.listeners.push(callback);
        }
    },
    update() {
        if(this.scene && this.camera && this.renderer) {
            this.isReady = true;
            while(this.listeners.length>0) {
                const listener = this.listeners.pop();
                listener();
            }
        }
    }
};
